package com.kiseny.action;

import java.util.ArrayList;
import java.util.List;

import com.kiseny.entity.UserInfo;
import com.kiseny.po.Account;

public class TestFreeMarkerAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private UserInfo user;

	private String msg;

	private ArrayList<UserInfo> userList = new ArrayList<UserInfo>();

	public ArrayList<UserInfo> getUserList() {
		return userList;
	}

	public String getMsg() {
		return msg;
	}

	public UserInfo getUser() {
		return user;
	}

	public void setUser(UserInfo user) {
		this.user = user;
	}

	public String test() {

		List<Account> accountList = getAuthenticationService().getAccountList();
		UserInfo userInfo = null;

		for (Account account : accountList) {
			userInfo = new UserInfo();
			userInfo.setUserName(account.getName());
			userInfo.setPassword(account.getPassword());
			userList.add(userInfo);
		}

		return SUCCESS;
	}

}
